﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bootstrap.Template.InnerItems
{
    public partial class BootstrapItemTemplate
    {
        #region Properties

        public bool IsActive { get; set; }
        public string Text { get; set; }
        public string Href { get; set; }
        public string Value { get; set; }
        public string BadgedValue { get; set; }

        #endregion

        #region Methods

        public string GetCss()
        {
            string result = string.Empty;

            if (IsActive)
            {
                result += " active";
            }

            return result;
        }

        public string GetBadged()
        {
            if (!string.IsNullOrEmpty(BadgedValue))
                return (new Badged.BootstrapBadgetTemplate() { Text = BadgedValue }).TransformText();

            return string.Empty;
        }

        public string GetDataValue()
        {
            if (!string.IsNullOrEmpty(Value))
                return string.Format("data-value=\"{0}\"", Value);

            return string.Empty;
        }

        #endregion

    }
}
